<?php

/**
 *动态码验证类
 */
class Request_Api_V2_Dynamic extends Request_Api_V2_Base
{
    public function __construct($request_param)
    {
        parent::__construct($request_param);
    }


    public function code()
    {
        $this->rules = [
            ['msgtype', ['not_empty']],
            ['receiver',['not_empty',array(strpos($this->request_param['receiver'], '@') !== false ? 'email' : 'phone')]]

        ];
        return $this;
    }

}